package day01.nio01;

import java.nio.ByteBuffer;

public class Demo01 {
    public static void main(String[] args) {
        //1.创建Buffer
//        ByteBuffer buf = ByteBuffer.allocate(5);
        byte [] data = new byte[]{1,2,3,4,5};
        ByteBuffer buf = ByteBuffer.wrap(data);
        System.out.println(buf); //java.nio.HeapByteBuffer[pos=0 lim=5 cap=5]

    }
}
